package com.agger.eurekacommonapi.service;

import com.agger.eurekacommonapi.hystrix.BaseHystrix;
import com.agger.eurekacommonapi.vo.ResultData;
import com.agger.eurekacommonapi.vo.UserVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * @classname: BaseManagerController
 * @description: eureka-client-manager-service服务点的基础接口
 * @author chenhx
 * @date 2020-04-23 10:46:22
 */
@FeignClient(value = "eureka-client-manager-service",path = "/man",fallback = BaseHystrix.class)
public interface BaseManagerController {

    @GetMapping("/helloManager/{name}")
    String helloManager(@PathVariable String name);

    @GetMapping("/helloManager2/{name}")
    String helloManager2(@PathVariable String name);

    @PostMapping("/adduser")
    ResultData addUser(@RequestBody UserVO user);

    @GetMapping("/headMan")
    String headMan(@RequestParam String man,@RequestHeader("X-Request-Foo") String foo);
}
